package com.kyjszj.modules.product.controller;

import com.kyjszj.core.common.controller.BaseCRUDController;
import com.kyjszj.core.security.shiro.authz.annotation.RequiresPathPermission;
import com.kyjszj.modules.product.entity.Product;
import com.kyjszj.modules.product.service.IProductService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("${admin.url.prefix}/sys/product")
@RequiresPathPermission("sys:product")
@Api(value="adminProductRest",description="后台商品管理",tags="AdminProductController")
public class AdminProductController extends BaseCRUDController<Product, String> {
    @Autowired
    private IProductService productService;

    @RequestMapping("/get")
    @ResponseBody
    public boolean saveAllProduct(){
        productService.saveProduct();
        System.out.println("完");
        return true;
    }
}
